package com.example.demo.account.service;

import com.example.demo.account.entity.SecurityUser;
import com.example.demo.account.entity.SysUser;
import com.example.demo.information.entity.Student;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Optional;

/**
 * 描述：
 *
 * @author littlecar
 * @date 2019/9/5 10:32
 */
public interface UserService {
    SysUser findByUsername(String username);

    List<SysUser> findAll();

    List<SysUser> findPageAll(Integer pages,Integer limit);

    void save(SysUser user);

    void delete(SysUser user);

    List<SysUser> findByUsernameLike(String username);

    Optional<SysUser> findById(Long id);

    HttpServletRequest doRoleChoose(Long roleId, HttpServletRequest request, SecurityUser currentUserDetails);

    List<SysUser> findPageByNameLike(String name,Integer page,Integer limit);

    List<SysUser> findByNameLike(String name);

    SysUser findByName(String name);

    List<SysUser> findBySfz(String sfz);

    String createUserForStu(Student student);

    void deleteXsAuth(Student student);

    List<SysUser> findAllSchoolAdmin();

    List<SysUser> findPageSchoolAdminByNameLike(String admin_name, int pages, int limit);

    List<SysUser> findSchoolAdminByNameLike(String admin_name);

    List<SysUser> findPageAllSchoolAdmin(int pages, int limit);

    List<SysUser> findUserBySchoolIdAndRoleId(Long school_id, Long role_id);

    List<SysUser> findPageBzrByNameLike(String bzr_name, Long xxxx_id, int pages, int limit);

    List<SysUser> findBzrByNameLike(String bzr_name, Long xxxx_id);

    List<SysUser> findPageAllBzr(Long xxxx_id, int pages, int limit);

    List<SysUser> findAllBzr(Long xxxx_id);
}
